package com.tarena.lbs.article.web.controller;

import com.tarena.lbs.article.web.service.ArticleCatsService;
import com.tarena.lbs.base.protocol.exception.BusinessException;
import com.tarena.lbs.base.protocol.model.Result;
import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.pojo.content.query.ArticleQuery;
import com.tarena.lbs.pojo.content.vo.ArticleCategoryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.HashSet;
import java.util.List;

//负责文章分类的http接口 CRUD
@RestController
public class ArticleCatsController {
    @Autowired
    private ArticleCatsService articleCatsService;
    @GetMapping("/admin/content/category/list")
    public Result<PageResult<ArticleCategoryVO>> categoryList()
            throws BusinessException{
        PageResult<ArticleCategoryVO> voPage=articleCatsService.categoryList();
        return new Result<>(voPage);
    }


}
